<!DOCTYPE html>
<html>
<head>
    <title></title>
    #parse("sys/header.html")
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <Row :gutter="16">
            <div class="search-group">
                <i-col span="4">
                    <i-input v-model="q.userName" @on-enter="query" placeholder="会员"/>
                </i-col>
                <i-col span="4">
                    <i-input v-model="q.couponName" @on-enter="query" placeholder="优惠劵"/>
                </i-col>
                <i-button @click="query">查询</i-button>
            </div>
            <!--#if($shiro.hasPermission("usercoupon:save"))-->
            <!--<i-button type="info" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</i-button>-->
            <!--#end-->
            <!--#if($shiro.hasPermission("usercoupon:update"))-->
            <!--<i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</i-button>-->
            <!--#end-->
            <div class="buttons-group">
                #if($shiro.hasPermission("usercoupon:delete"))
                <i-button type="error" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</i-button>
                #end
            </div>
        </Row>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <Card v-show="!showList">
        <p slot="title">{{title}}</p>
        <i-form :model="userCoupon" :label-width="80">
            <Form-item label="优惠券Id" prop="couponId">
                <i-input v-model="userCoupon.couponId" placeholder="优惠券Id"/>
            </Form-item>
            <Form-item label="优惠券数量" prop="couponNumber">
                <i-input v-model="userCoupon.couponNumber" placeholder="优惠券数量"/>
            </Form-item>
            <Form-item label="会员Id" prop="userId">
                <i-input v-model="userCoupon.userId" placeholder="会员Id"/>
            </Form-item>
            <Form-item label="使用时间" prop="usedTime">
                <Date-picker v-model="userCoupon.usedTime" placeholder="使用时间"/>
            </Form-item>
            <Form-item label="订单Id" prop="orderId">
                <i-input v-model="userCoupon.orderId" placeholder="订单Id"/>
            </Form-item>
            <Form-item>
                <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
                <i-button type="warning" @click="reload" style="margin-left: 8px"/>
                返回</i-button>
                <i-button type="ghost" @click="handleReset('formValidate')" style="margin-left: 8px">重置</i-button>
            </Form-item>
        </i-form>
    </Card>
</div>

<script src="${rc.contextPath}/js/shop/usercoupon.js?_${date.systemTime}"></script>
</body>
</html>